﻿<UserControl x:Class="UserAccountModule.Views.LoginView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:helper="clr-namespace:Infrastructure.Helpers;assembly=Infrastructure"
             xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="800" d:DesignWidth="600" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Infrastructure;component/Themes/CommonTemplates.xaml" />
            </ResourceDictionary.MergedDictionaries>

            <RadialGradientBrush x:Key="GlowFX" GradientOrigin=".5,1" Center=".5,1">
                <GradientStop Offset="0" Color="#990000FF"></GradientStop>
                <GradientStop Offset=".5" Color="#660000DD"></GradientStop>
                <GradientStop Offset="1" Color="#33000000"></GradientStop>
            </RadialGradientBrush>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.Background>
            <ImageBrush ImageSource="/UserAccountModule;component/Images/Official.jpg" Stretch="UniformToFill" TileMode="None" />
        </Grid.Background>
        <Grid HorizontalAlignment="Stretch" VerticalAlignment="Center" Background="#84FFFFFF">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                <StackPanel HorizontalAlignment="Center">
                    <Label Foreground="White" Content="Tên đăng nhập:" />
                    <Label Foreground="White" Content="Mật khẩu:" />
                </StackPanel>
                <StackPanel HorizontalAlignment="Center">
                    <telerik:RadWatermarkTextBox x:Name="txtUsername" Margin="0,1,0,0" Width="200" 
                                         Text="{Binding UserName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                    <PasswordBox x:Name="txtPassword" Margin="0,4,0,0" Width="200" helper:PasswordHelper.Password="{Binding Password, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                </StackPanel>
            </StackPanel>
            <telerik:RadButton Content="Đăng nhập" Grid.Row="1" Height="Auto" Name="radButton1" HorizontalAlignment="Center" VerticalAlignment="Center" 
                               Margin="5" Width="100"
                               IsDefault="True"
                               Command="{Binding LoginCommand}"/>
        </Grid>
    </Grid>
</UserControl>
